home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / rtf-redr.hqx / rtf.h < prev    next >
Text File  |  1992-12-19  |  1KB  |  39 lines

  1. /*
  2.  * This software is copyright 1992 by Robert Morris.
  3.  * You may freely redistribute this software as shareware
  4.  * if you do so in the same form as you got it. If you find
  5.  * this software useful, please send $12 to:
  6.  *   Robert Morris
  7.  *   P.O. Box 1044
  8.  *   Harvard Square Station
  9.  *   Cambridge, MA 02238
  10.  *   ecognome@aol.com
  11.  * If you incorporate any of this software in any kind of
  12.  * commercial product, please send $2 per copy distributed
  13.  * to the above address.
  14.  */
  15.  
  16. /*
  17.  * utilities for parsing RTF.
  18.  */
  19.  
  20. /*
  21.  * my own version of TEStyleRec that has 32-bit character
  22.  * offsets, instead of 16-bit.
  23.  */
  24. typedef struct{
  25.     long startChar;
  26.     long styleIndex;
  27. } MyStyleRun;
  28.  
  29. typedef struct{
  30.     long nRuns;
  31.     long nStyles;
  32.     STHandle styleTab;
  33.     MyStyleRun runs[1]; /* this array grows */
  34. } MyStyleRec, **MyStyleHandle;
  35.  
  36. void parsertf(Handle txt, MyStyleHandle *shp, Handle *outtxt);
  37. MyStyleHandle NewMyStyleHandle(void);
  38. void DisposMyStyleHandle(MyStyleHandle);
  39. OSErr CvtMyStyleHandle(MyStyleHandle, long *start, TEStyleHandle, long max, Handle txt);